[#if enquiry?? ]
<table class="table table-hover table-bordered table-striped ">
	<tr>
		<th colspan="2" >${enquiry.enquiryName!}</th>
	</tr>

	<tr>
		<td colspan="2" class="tc"  >
		${allStates[enquiry.state?string]} 》》  ${allStates[prostate?string]}
		</td>
	</tr>

	<tr>
		<th>通知采购方:${contacts!}/${phone!}</th>
		<td class="w80"><input class="w50"  id="smscheck" type="checkbox" value="1"   checked="checked"  ></td>
	</tr>


	[#if prostate ==2 ]
	<tr>
		<th>退回原因:</th>
		<td class="w80" ><input  id="backreason"  type="text" name="backreason"   ></td>
	</tr>
	[/#if]

    <!-- 1.公开发布 ;2.不公开发布 -->

	[#if prostate ==1 && ((!enquiry.hadsendsms??) || (enquiry.hadsendsms==0)) ]
        [#--1.设计询价 2.采购询价--]
		[#if enquiry.qtype ==2 ]
			[#if enquiry.pubtype?? ]
			<tr>
				<th>[#if enquiry.pubtype==1 ]通知相关供应商:[#else]通知相关供应商:[/#if]<br><span style="color: red;" >约涉及 ${numsize!0} 人<span></th>
				<td class="w80" ><input class="w50" id="typesmscheck" name="typesmscheck"  type="checkbox" value="1"   >
				</td>
			</tr>
			[/#if]
		[#else]
            <tr>
                <th>通知相关供应商:<br><span style="color: red;" >约涉及 ${numsize!0} 人</span></th>
                <td class="w80" ><input class="w50" id="typesmscheck" name="typesmscheck"  type="checkbox" value="1"   >
				</td>
            </tr>
		[/#if]
	[/#if]

    <tr>
		<td colspan="2"  class="tc" >
			<button type="button" class="btn btn-success" onclick="gotochange(${enquiryid},${prostate})"  >确定 </button>
		</td>
	</tr>
    <tr>
		<td colspan="2"   >
			*当前短信通知工作时间${worktime!},不在时间范围内将顺延到下个工作时间发送
		</td>
	</tr>
</table>

<script>
function gotochange(enquiryid,prostate){
	var smscheck =0;

	if($("#smscheck").is(":checked")){
		smscheck = 1;
	};
	var typesmscheck =0;
	if($("#typesmscheck").is(":checked")){
        typesmscheck = 1;
	};



	var backreason = $("#backreason").val();
	art.dialog.post({
		url:"/enq/o_prostate_changed.do",
		data:{enquiryid:enquiryid,prostate:prostate,smscheck:smscheck,typesmscheck:typesmscheck,backreason:backreason},
		success:function(data){
			if(data.success){
				art.dialog.alert(data.msg,function(){
					//刷新
					changestatrecallback();
				});
			}else{
				art.dialog.tips(data.msg);
			}
		}
	});
}

</script>

[/#if]
